package com.zksk.admin.api.factory;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zksk.admin.api.RemoteInvoiceRecordService;
import com.zksk.admin.api.RemotePolicyService;
import com.zksk.admin.api.RemoteProductService;
import com.zksk.admin.api.domain.portal.vo.PolicyInfoVo;
import com.zksk.common.core.domain.R;
import com.zksk.mbg.admin.domain.MemberInvoiceRecord;
import com.zksk.mbg.admin.domain.PolicyInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteInvoiceRecordFallbackFactory implements FallbackFactory<RemoteInvoiceRecordService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteInvoiceRecordFallbackFactory.class);

    @Override
    public RemoteInvoiceRecordService create(Throwable throwable) {
        log.error("系统模块调用失败:{}", throwable.getMessage());
        return new RemoteInvoiceRecordService() {
            @Override
            public R<MemberInvoiceRecord> getByOrdersId(Long ordersId, String source) {
                return null;
            }

            @Override
            public R<MemberInvoiceRecord> saveInvoiceRecord(MemberInvoiceRecord memberInvoiceRecord, String source) {
                return null;
            }
        };
    }
}
